
load 3exp.csv

exp=X3exp;


figure,plot(exp(:,2),exp(:,6),'--r',exp(:,3),exp(:,5),'-b');
xlabel('CPU Usage');
ylabel('Power Usage');
legend('pow6','pow8');

[pow6,ErrorEst]=polyfit(exp(:,2),exp(:,6),10);
pow6_fit=polyval(pow6,exp(:,2),ErrorEst);

[pow8,ErrorEst]=polyfit(exp(:,3),exp(:,5),10);
pow8_fit=polyval(pow8,exp(:,3),ErrorEst);
figure,figure,plot(exp(:,2),exp(:,6),'+r',exp(:,2),pow6_fit,'-r',...
     exp(:,3),exp(:,5),'+b',exp(:,3),pow8_fit,'-b');
xlabel('CPU Usage');
ylabel('Power Usage');
legend('pow6','pow6 fit','pow8','pow8 fit');




